home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 1999 #5 / 1999 CD 5 (black).iso / Delphi3 / install / data.z / LZEXPAND.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-08-04  |  2.7 KB  |  65 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Run-time Library                         }
  5. {       Windows 32bit API Interface Unit                }
  6. {                                                       }
  7. {       Copyright (c) 1996,97 Borland International     }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit LZExpand;
  12.  
  13. {$WEAKPACKAGEUNIT}
  14.  
  15. interface
  16.  
  17. uses Windows;
  18.  
  19. { Error Return Codes }
  20.  
  21. const
  22.   LZERROR_BADINHANDLE = -1;         { invalid input handle }
  23.   LZERROR_BADOUTHANDLE = -2;        { invalid output handle }
  24.   LZERROR_READ = -3;                { corrupt compressed file format }
  25.   LZERROR_WRITE = -4;               { out of space for output file }
  26.   LZERROR_GLOBALLOC = -5;           { insufficient memory for LZFile struct }
  27.   LZERROR_GLOBLOCK = -6;            { bad global handle }
  28.   LZERROR_BADVALUE = -7;            { input parameter out of acceptable range }
  29.   LZERROR_UNKNOWNALG = -8;          { compression algorithm not recognized }
  30.  
  31.  
  32. { Prototypes }
  33.  
  34. function LZCopy(Source, Dest: Integer): Longint; stdcall;
  35. function LZInit(Source: Integer): Integer; stdcall;
  36. function GetExpandedNameA(Source, Buffer: PAnsiChar): Integer; stdcall;
  37. function GetExpandedNameW(Source, Buffer: PWideChar): Integer; stdcall;
  38. function GetExpandedName(Source, Buffer: PChar): Integer; stdcall;
  39. function LZOpenFileA(Filename: PAnsiChar; var ReOpenBuff: TOFStruct; Style: Word): Integer; stdcall;
  40. function LZOpenFileW(Filename: PWideChar; var ReOpenBuff: TOFStruct; Style: Word): Integer; stdcall;
  41. function LZOpenFile(Filename: PChar; var ReOpenBuff: TOFStruct; Style: Word): Integer; stdcall;
  42. function LZSeek(hFile: Integer; Offset: Longint; Origin: Integer): Longint; stdcall;
  43. function LZRead(hFile: Integer; Buffer: LPSTR; Count: Integer): Integer; stdcall;
  44. procedure LZClose(hFile: Integer); stdcall;
  45.  
  46.  
  47. implementation
  48.  
  49. const
  50.   lz32 = 'LZ32.DLL';
  51.  
  52. function GetExpandedNameA;    external lz32 name 'GetExpandedNameA';
  53. function GetExpandedNameW;    external lz32 name 'GetExpandedNameW';
  54. function GetExpandedName;    external lz32 name 'GetExpandedNameA';
  55. procedure LZClose;              external lz32 name 'LZClose';
  56. function LZCopy;                external lz32 name 'LZCopy';
  57. function LZInit;                external lz32 name 'LZInit';
  58. function LZOpenFileA;         external lz32 name 'LZOpenFileA';
  59. function LZOpenFileW;         external lz32 name 'LZOpenFileW';
  60. function LZOpenFile;         external lz32 name 'LZOpenFileA';
  61. function LZRead;                external lz32 name 'LZRead';
  62. function LZSeek;                external lz32 name 'LZSeek';
  63.  
  64. end.
  65.